﻿@using Telerik.Web.Mvc.UI;
@model SpecificationAttributeOptionModel

@Html.ValidationSummary(false)
@Html.HiddenFor(model => model.Id)
@Html.HiddenFor(model => model.SpecificationAttributeId)

@(Html.LocalizedEditor<SpecificationAttributeOptionModel, SpecificationAttributeOptionLocalizedModel>("specificationattribute-localized",
@<table class="adminContent">
    <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.Locales[item].Name)
        </td>
        <td class="adminData">
			@*IMPORTANT: Do not delete, this hidden element contains the id to assign localized values to the corresponding language *@
			@Html.HiddenFor(model => model.Locales[item].LanguageId)

            @Html.EditorFor(model => Model.Locales[item].Name)
            @Html.ValidationMessageFor(model => model.Locales[item].Name)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.Locales[item].Alias)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => Model.Locales[item].Alias)
            @Html.ValidationMessageFor(model => model.Locales[item].Alias)
        </td>
    </tr>
</table>
,
@<table class="adminContent">
    <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.Name)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </td>
    </tr>
	    <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.Alias)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Alias)
            @Html.ValidationMessageFor(model => model.Alias)
        </td>
    </tr>
</table>
))
<table class="adminContent">
    <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.PictureId)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.PictureId, new { transientUpload = true })
            @Html.ValidationMessageFor(model => model.PictureId)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.Color)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Color)
            @Html.ValidationMessageFor(model => model.Color)
        </td>
    </tr>
	<tr>
		<td class="adminTitle">
			@Html.SmartLabelFor(model => model.NumberValue)
		</td>
		<td class="adminData">
			@Html.EditorFor(model => model.NumberValue)
			@Html.ValidationMessageFor(model => model.NumberValue)
		</td>
	</tr>
    <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.DisplayOrder)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DisplayOrder)
            @Html.ValidationMessageFor(model => model.DisplayOrder)
        </td>
    </tr>
@if (ViewBag.MultipleEnabled == true)
{
   <tr>
        <td class="adminTitle">
            @Html.SmartLabelFor(model => model.Multiple)
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Multiple)
            @Html.ValidationMessageFor(model => model.Multiple)
        </td>
    </tr>
}
</table>

